<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>PC-四栏特征框</title>
</head>

<body>


    <div class="business-evaluation">
        <div class="cards">
            <div class="card-wrapper">
                <div class="evaluation-card current" style="background-image:url(./images/t01571c09ea48424a9c.png)">
                    <div class="cate" style="background-color:#0256ff">
                        教育机构
                    </div>
                    <div class="card-header">
                        <div class="logo">
                            <div class="inner" style="background-image:url(./images/t0101f1d35821a56abe.png)">
                            </div>
                        </div>
                        <div class="enterprise">西京学院</div>
                        <div class="divide" style="background-color:#cdd6e8"></div>
                    </div>
                    <div class="card-body">
                        <div class="evaluation">“360企业安全云为高校打造了纯净、安全、合规的授课环境”</div>
                        <div class="data-list">
                            <div class="data-item">
                                <div class="num"><span>100</span>%
                                </div>
                                <div class="name">弹窗拦截</div>
                            </div>
                            <div class="data-item">
                                <div class="num"><span>100</span>%
                                </div>
                                <div class="name">软件正版化</div>
                            </div>
                        </div>
                    </div>
                    <div class="card-footer">
                        立即咨询
                        <div class="arrow"></div>
                    </div>
                </div>
            </div>
            <div class="card-wrapper">
                <div class="evaluation-card" style="background-image:url(./images/t016e60a87664db8257.png)">
                    <div class="cate" style="background-color:#23d58b">
                        连锁零售
                    </div>
                    <div class="card-header">
                        <div class="logo">
                            <div class="inner" style="background-image:url(./images/t015ae570055a005a61.png)">
                            </div>
                        </div>
                        <div class="enterprise">鲜丰水果</div>
                        <div class="divide" style="background-color:#c7f0c5"></div>
                    </div>
                    <div class="card-body">
                        <div class="evaluation">“360企业安全云使加盟分店资产丢失的情况减少了，业务效率有了大幅提升”</div>
                        <div class="data-list">
                            <div class="data-item">
                                <div class="num"><span>100</span>%
                                </div>
                                <div class="name">勒索攻击拦截</div>
                            </div>
                            <div class="data-item">
                                <div class="num"><span>60</span>%
                                </div>
                                <div class="name">业务效率提升</div>
                            </div>
                        </div>
                    </div>
                    <div class="card-footer">
                        立即咨询
                        <div class="arrow"></div>
                    </div>
                </div>
            </div>
            <div class="card-wrapper">
                <div class="evaluation-card" style="background-image:url(./images/t0140bf3a2e9900c883.png)">
                    <div class="cate" style="background-color:#3778fb">
                        金融保险
                    </div>
                    <div class="card-header">
                        <div class="logo">
                            <div class="inner" style="background-image:url(./images/t0143b15e1ed1477b17.png)">
                            </div>
                        </div>
                        <div class="enterprise">邮政银行分行</div>
                        <div class="divide" style="background-color:#afd4f4"></div>
                    </div>
                    <div class="card-body">
                        <div class="evaluation">“360企业安全云是一款智能化的风险防御、监测与响应平台”</div>
                        <div class="data-list">
                            <div class="data-item">
                                <div class="num"><span>60</span>%
                                </div>
                                <div class="name">未知ip接入拦截</div>
                            </div>
                            <div class="data-item">
                                <div class="num"><span>100</span>%
                                </div>
                                <div class="name">并发风险响应</div>
                            </div>
                        </div>
                    </div>
                    <div class="card-footer">
                        立即咨询
                        <div class="arrow"></div>
                    </div>
                </div>
            </div>
            <div class="card-wrapper">
                <div class="evaluation-card" style="background-image:url(./images/t0124b7bd357e77bc18.png)">
                    <div class="cate" style="background-color:#62dee5">
                        制造业
                    </div>
                    <div class="card-header">
                        <div class="logo">
                            <div class="inner" style="background-image:url(./images/t01b603afb44752ca3c.png)">
                            </div>
                        </div>
                        <div class="enterprise">哈尔滨三联药业</div>
                        <div class="divide" style="background-color:#b3e7f0"></div>
                    </div>
                    <div class="card-body">
                        <div class="evaluation">“我们使用360企业安全云已经有段时间了，产品的数据资产防护能力确实值得信赖”</div>
                        <div class="data-list">
                            <div class="data-item">
                                <div class="num"><span>60</span>%
                                </div>
                                <div class="name">数据泄露风险降低</div>
                            </div>
                            <div class="data-item">
                                <div class="num"><span>100</span>%
                                </div>
                                <div class="name">未知外设接入拦截</div>
                            </div>
                        </div>
                    </div>
                    <div class="card-footer">
                        立即咨询
                        <div class="arrow"></div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <style>
        .business-evaluation {
            font-family: PingFangSC;
            color: #191919;
            height: 946px;
            background: #f0f7ff;
        }

        .business-evaluation .cards {
            display: flex;
            margin: 0 auto;
            width: 1184px;
            height: 485px;
        }

        .business-evaluation .card-wrapper {
            position: relative;
            width: 25%;
        }

        /*正常*/
        .business-evaluation .evaluation-card {
            position: absolute;
            bottom: 0;
            left: 50%;
            width: 296px;
            height: 476px;
            background-color: #cfe5fc;
            transform: translateX(-50%);
            transition: all .15s;
            overflow: hidden;
            background-size: cover;
            background-position: center -56px;
        }

        /*选中*/
        .business-evaluation .evaluation-card.current {
            width: 318px;
            height: 494px;
            border-radius: 8px;
            z-index: 20;
            box-shadow: 0 4px 20px 0 rgb(55 88 164 / 20%);
            cursor: pointer;

        }

        /*标识*/
        .business-evaluation .evaluation-card .cate {
            position: absolute;
            top: 0;
            left: 0;
            padding: 0 10px;
            height: 20px;
            line-height: 20px;
            font-size: 12px;
            border-bottom-right-radius: 4px;
            color: #fff;
        }

        /*标头*/
        .business-evaluation .evaluation-card .card-header {
            display: flex;
            align-items: center;
            position: relative;
            margin: 0 auto;
            padding: 34px 0 16px;
            height: 98px;
            width: 246px;
        }

        .business-evaluation .evaluation-card .card-header .logo {
            margin-right: 12px;
            padding: 6px;
            border-radius: 50%;
            background-color: #fff;
        }

        .business-evaluation .evaluation-card .card-header .logo .inner {
            width: 30px;
            height: 30px;
            background-size: cover;
            background-repeat: no-repeat;
        }

        .business-evaluation .evaluation-card .card-header .enterprise {
            height: 28px;
            line-height: 28px;
            font-size: 20px;
            font-weight: 700;
        }

        .business-evaluation .evaluation-card .card-header .divide {
            position: absolute;
            left: 50%;
            bottom: 0;
            width: 246px;
            height: 1px;
            transform: translateX(-50%);
        }

        /*内容*/
        .business-evaluation .evaluation-card .card-body .evaluation {
            margin: 16px auto 18px;
            width: 246px;
            height: 62px;
            font-size: 14px;
            line-height: 22px;
        }

        .business-evaluation .evaluation-card .card-body .data-list {
            margin: 0 auto;
            width: 246px;
        }

        .business-evaluation .evaluation-card .card-body .data-item {
            display: inline-block;
            margin-right: 32px;
        }

        .business-evaluation .evaluation-card .card-body .data-item:last-child {
            margin-right: 0;
        }



        .business-evaluation .evaluation-card .card-body .data-item .num {
            margin-bottom: 1px;
            height: 28px;
            line-height: 28px;
            font-size: 20px;
            font-family: Tadfont-Bold;
        }

        .business-evaluation .evaluation-card.current .data-item .num {
            color: #356dee;
        }

        .business-evaluation .evaluation-card .card-body .data-item .name {
            font-size: 12px;
            color: #666;
        }

        /*底部*/


        .business-evaluation .evaluation-card .card-footer {
            display: flex;
            justify-content: space-between;
            align-items: center;
            position: absolute;
            bottom: 0;
            left: 0;
            padding: 0 20px 0 30px;
            width: 100%;
            height: 56px;
            line-height: 56px;
            font-size: 14px;
            background-color: #fff;
        }

        .business-evaluation .evaluation-card.current .card-footer {
            padding: 0 36px;
            color: #fff;
            background-color: #356dee;
        }



        .business-evaluation .evaluation-card .card-footer .arrow {
            width: 24px;
            height: 24px;
            background-image: url(./images/t01a9ed8b72c464ba77.png);
            background-size: cover;
        }

        .business-evaluation .evaluation-card.current .card-footer .arrow {
            background-image: url(./images/t01f2fd35f995b312ff.png);
        }

        *,
        :after,
        :before {
            box-sizing: border-box;
        }

        .business-evaluation {
            padding-top: 6em;
        }
    </style>

    <script>
        //给指定的div添加class
        const btn = () => {
            document.querySelectorAll(".evaluation-card")[1].classList.add("current");
        };

        //拿到所有的类数组
        let class_diy = document.querySelectorAll(".evaluation-card");
        console.log(class_diy)


        var li = document.getElementsByClassName("evaluation-card")
        for (var i = 0; i < li.length; i++) {
            li[i].onmouseover = function () {
                for (var j = 0; j < li.length; j++) {
                    li[j].classList.remove('current')
                }
                this.classList.add('current')
            }
            li[i].onmouseleave = function () {
                this.classList.remove('current')
                document.querySelectorAll(".evaluation-card")[0].classList.add("current");
            }

        }



    </script>

    <button type="button" onclick="btn()">添加class</button>

</body>

</html>